package com.iknow;

import com.iknow.http.HttpException;
import com.iknow.http.Response;
import org.json.JSONException;
import org.json.JSONObject;

public class UserResponse extends IKnowResponse
{
  private static final long serialVersionUID = -818363842L;
  private String mEmail;
  private String mJID;
  private String mNickName;
  private String mSid;

  public UserResponse(Response paramResponse)
    throws HttpException
  {
    init(paramResponse.asJSONObject());
  }

  private void init(JSONObject paramJSONObject)
    throws HttpException
  {
    try
    {
      this.mSid = paramJSONObject.getString("sid");
      this.mNickName = paramJSONObject.getString("nickName");
      this.mEmail = paramJSONObject.getString("email");
      this.mJID = paramJSONObject.getString("xid");
      return;
    }
    catch (JSONException localJSONException)
    {
      throw new HttpException(localJSONException);
    }
  }

  public String getEmail()
  {
    return this.mEmail;
  }

  public String getJID()
  {
    return this.mJID;
  }

  public String getNickName()
  {
    return this.mNickName;
  }

  public String getSID()
  {
    return this.mSid;
  }
}